import request from '@/utils/request'

// 巡查记录列表
export function listRecord(params) {
  return request({
    url: '/supervise/inspectionRecordApi/list',
    method: 'post',
    params
  })
}

// 巡查记录列表无权限
export function inspectionRecord(params) {
  return request({
    url: '/supervise/inspectionRecordApi/listNoPermission',
    method: 'post',
    params
  })
}

// 删除巡查记录
export function deleteRecord(id) {
  return request({
    url: '/supervise/inspectionRecordApi/remove',
    method: 'post',
    params: { id }
  })
}

// 新增巡查记录
export function addRecord(data) {
  return request({
    url: '/supervise/inspectionRecordApi/add',
    method: 'post',
    data: data
  })
}

// 更新巡查记录
export function updateRecord(data) {
  return request({
    url: '/supervise/inspectionRecordApi/update',
    method: 'post',
    data: data
  })
}

// 巡查记录详情
export function getRecordById(id) {
  return request({
    url: '/supervise/inspectionRecordApi/get/' + id
  })
}
